//
//  BaseViewController.swift
//  guoziyuan
//
//  Created by aibaimm on 2017/8/22.
//  Copyright © 2017年 guoziyuan. All rights reserved.
//

import UIKit

class BaseViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        setTitleColor(color: blackColor,font: UIFont.boldSystemFont(ofSize: 16))
        
//        navigationController?.navigationBar.isTranslucent = false
//        navigationController?.navigationBar.barTintColor = UIColor.green

        // Do any additional setup after loading the view.
    }

    //设置导航条上的字体颜色和大小:
    func setTitleColor(color:UIColor!,font:UIFont!) {
//        if ((color === nil) && (font === nil)) {
//            return
//        }
        
        var dict = [AnyHashable:Any]()
        if (color != nil) {
        dict[NSForegroundColorAttributeName] = color
        }
        if font != nil {
            dict[NSFontAttributeName] = font
        }
        
        self.navigationController?.navigationBar.titleTextAttributes = dict as? [String : Any];
    
        
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
